package com.cloudkinto.service.company.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
public class DeliveryFeeCalcPushReq {
    @ApiModelProperty(value = "服务商 code", required = true)
    private String cwProviderCode;
    @ApiModelProperty(value = "服务商名称", required = true)
    private String cwProviderName;

    @ApiModelProperty(value = "批次组 Id", required = true)
    private String batchGroupId;
    @ApiModelProperty(value = "", required = true)
    private List<DeliveryFee>  deliveryFeeList;

    @Data
    public static class DeliveryFee {
        @ApiModelProperty(value = "批次 Id", required = true)
        private String batchId;
        @ApiModelProperty(value = "合作仓的实际仓库代码", required = true)
        private String cwWarehouseCode;
        @ApiModelProperty(value = "物流产品编码", required = true)
        private String logisticsProductCode;


        @ApiModelProperty(value = "是否可以送达", required = true)
        private boolean canDelivery = true;

        @ApiModelProperty(value = "不可送达原因", required = false)
        private String canNotDeliveryReason;
        @ApiModelProperty(value = "派送时效,小时级别", required = false)
        private Integer logisticsTime;

        @ApiModelProperty(value = "币种，默认 USD", required = false)
        private String currency;
        @ApiModelProperty(value = "预估总费用", required = false)
        private String totalFee;
        @ApiModelProperty(value = "费用列表", required = false)
        List<FeeInfo> feeList;


        public DeliveryFee() {
        }

        public DeliveryFee(String batchId, String cwWarehouseCode) {
            this.batchId = batchId;
            this.cwWarehouseCode = cwWarehouseCode;
        }

        public DeliveryFee(String batchId, String cwWarehouseCode, String logisticsProductCode, String currency, String totalFee) {
            this.batchId = batchId;
            this.cwWarehouseCode = cwWarehouseCode;
            this.logisticsProductCode = logisticsProductCode;
            this.currency = currency;
            this.totalFee = totalFee;
        }
    }


    @Data
    public static class FeeInfo {
        @ApiModelProperty(value = "子项费用", required = false)
        private String Fee;
        @ApiModelProperty(value = "币种，默认 USD", required = false)
        private String currency;
        @ApiModelProperty(value = "费用描述", required = false)
        private String feeDesc;
        @ApiModelProperty(value = "费用项编码", required = false)
        private String feeCode;
    }


    public DeliveryFeeCalcPushReq() {
    }

    public DeliveryFeeCalcPushReq(String batchGroupId) {
        this.batchGroupId = batchGroupId;
    }
}
